package com.ly.oa.service.flow;

import java.util.Map;

import com.ly.core.jbpm.pv.ParamField;
import com.ly.core.service.BaseService;
import com.ly.oa.action.flow.FlowRunInfo;
import com.ly.oa.model.flow.ProDefinition;
import com.ly.oa.model.flow.ProcessForm;
import com.ly.oa.model.flow.ProcessRun;

public interface ProcessRunService extends BaseService<ProcessRun> {
	public void saveProcessRun(ProDefinition proDefinition,
			Map<String, ParamField> fieldMap, String activityName,
			boolean startFlow);

	public ProcessRun getByPiId(String piId);

	/**
	 * 完成任务，同时把数据保存至form_data表，记录该任务填写的表单数据
	 * 
	 * @param piId
	 * @param transitionName
	 * @param variables
	 */
	public void saveAndNextstep(String piId, String activityName,
			String transitionName, Map<String, ParamField> fieldMap);

	public abstract ProcessRun getByTaskId(String paramString);

	public abstract void saveProcessRun(ProcessRun paramProcessRun,
			ProcessForm paramProcessForm, FlowRunInfo paramFlowRunInfo);
	public abstract ProcessRun initNewProcessRun(ProDefinition paramProDefinition);
	public abstract void saveAndNextStep(FlowRunInfo paramFlowRunInfo);
}
